﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SDT.Model.Payment>" %>
<%@ Import Namespace="SDT.Lib.Helpers" %>
<%@ Import Namespace="SDT.Lib.Paging" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Thêm mới đối tượng
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<% if (ViewData["MessageInfo"] == null)
   {%>
<form action="/Payment/Create" method="post" name="adminForm", id="adminForm">
    <fieldset>
    <legend>Thêm mới phương thức</legend>
    <font color="red">*</font> là trường bắt buộc phải nhập.
    <table width="100%" class="admintable">
        <tr>
            <td class="key">Tên phương thức thanh toán(<font color="red">*</font>)</td>
            <td><%=Html.TextBoxFor(m=>m.Name, new { @class = "required", style = "width:400px" })%></td>
        </tr>
        <tr>
            <td class="key">Độ ưu tiên</td>
            <td><%=Html.TextBoxFor(m => m.Priority, new { })%></td>
        </tr>
        <tr>
            <td class="key">Mô tả</td>
            <td><%=Html.TextAreaFor(m=>m.Description, new { rows = 15, cols = 50, style = "width: 770px"})%></td>
        </tr> 
        <tr>
            <td align="center" colspan="2"><input type="submit" id="btnsubmit" name="btnsubmit" value="Lưu" /><input type="reset" id="btnreset" name="btnreset" value="Nhập lại" /></td>
        </tr>  
    </table>
    </fieldset>
    </form>

    <script type="text/javascript">
        $(document).ready(function() {
            $("#adminForm").validate({
                rules: {
                    Name: "required"
                },
                messages: {
                    Name: "Trường này là bắt buộc, vui lòng nhập dữ liệu!"
                }
            });
        });
        tinyMCE.init({
            mode: "textareas",
            theme: "advanced",
            plugins: "paste,imagemanager",
            theme_advanced_buttons1: "pastetext,separator,bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink,insertimage,code",
            theme_advanced_buttons2: "",
            theme_advanced_buttons3: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left",
            theme_advanced_statusbar_location: "bottom",
            paste_use_dialog: false,
            paste_auto_cleanup_on_paste: true,
            paste_convert_headers_to_strong: false,
            paste_strip_class_attributes: "all",
            paste_remove_spans: true,
            paste_remove_styles: true
        });  

    </script>
	<% }%>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
<%=Html.Toolbar("Quay lại","/Payment","back" )%>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
Phương thức thanh toán
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
<%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
